home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
tools
/
czesc_1
/
easyprocess
/
source
/
launch
/
checkalive.c
next >
Wrap
C/C++ Source or Header
|
1992-09-07
|
981b
|
54 lines
#include <arpbase.h>
#include <arp_proto.h>
#include "Launch.h"
#include "LaunchPriv.h"
/*
* NAME
* CheckAlive -- check if the process is still alive.
*
* SYNOPSIS
* alive = CheckAlive (Proc)
*
* BOOL CheckAlive (struct Process *);
*
* DESCRIPTION
* Scan the list of process pair for a pair whose child is the
* process passed as input. It then check if the entry point is
* NULL, meaning the child is dead.
*
* INPUT
* Proc - the process who wants to find if it's alive.
*
* OUTPUT
* alive - non-null if the process is alive.
*
* NOTE
* This function can be used as a polling mecanism to find out
* if the child still exists.
*
* HISTORY
* 1992/09/06 Pierre Baillargeon Creation
*
*/
BOOL CheckAlive (struct Process *Proc)
{
struct ProcPair *pp;
BOOL result;
Forbid ();
if (NULL != ProcPairList && NULL != (pp = IsChild (Proc)))
{
result = (pp->pp_ChildEntry != NULL);
}
else
{
result = 0;
}
Permit ();
return result;
}